

#ifndef UC_GELNSG2D_H
#define UC_GELNSG2D_H

#include "zgeline2d.h"
#pragma pack (push, 8)

class
GE_DLLEXPIMPORT
UcGeLineSeg2d : public UcGeLinearEnt2d
{
public:
    UcGeLineSeg2d();
    UcGeLineSeg2d(const UcGeLineSeg2d& line);
    UcGeLineSeg2d(const UcGePoint2d& pnt1, const UcGePoint2d& pnt2);
    UcGeLineSeg2d(const UcGePoint2d& pnt, const UcGeVector2d& vec);

    UcGeLineSeg2d& set(const UcGePoint2d& pnt, const UcGeVector2d& vec);
    UcGeLineSeg2d& set(const UcGePoint2d& pnt1, const UcGePoint2d& pnt2);
    UcGeLineSeg2d& set(const UcGeCurve2d& curve1,
                       const UcGeCurve2d& curve2,
                       double& param1, double& param2,
                       ZSoft::Boolean& success);
    UcGeLineSeg2d& set(const UcGeCurve2d& curve, const UcGePoint2d& point,
                       double& param, ZSoft::Boolean& success);

    void           getBisector(UcGeLine2d& line) const;

    UcGePoint2d    baryComb   (double blendCoeff) const;

    UcGePoint2d    startPoint   () const;
    UcGePoint2d    midPoint     () const;
    UcGePoint2d    endPoint     () const;
    double         length       () const;
    double         length       (double fromParam, double toParam,
                                 double tol = UcGeContext::gTol.equalPoint())
                                const;

    UcGeLineSeg2d& operator =  (const UcGeLineSeg2d& line);
};

#pragma pack (pop)
#endif
